function out = my_summary(Input,option)
	% out = my_summary(in)
	% -------- custom function ------
	% description:
	%	get basic statistic information
	% input:
	%	matrix, unlimited dimensions
	% output:
	%	out,struct,
	%		* Mean
	%		* Quantile
	%		* Range =[min,max]
	%		* Std
	% Author: Sid Chen
	% Date: 2022/01/07
	arguments
		Input double
		option.NaNflag string {mustBeMember(option.NaNflag,{'includenan','omitnan'})} = 'omitnan'
		option.ShowFlag = true
	end

	out.Mean = mean(Input,'all',option.NaNflag);
	out.Quantile = quantile(Input,[0.05,0.25,0.5,0.75,0.95],'all');
	out.Range = [min(Input,[],'all'),max(Input,[],'all')];
	out.Std = std(Input,1,'all',option.NaNflag);

	if option.ShowFlag
		fprintf("Mean is:\t%g\n",out.Mean);
		fprintf("Quantile [0.05,0.25,0.5,0.75,0.95] is:\n");
		fprintf("\t 0.05:\t %g\n",out.Quantile(1));
		fprintf("\t 0.25:\t %g\n",out.Quantile(2));
		fprintf("\t 0.50:\t %g\n",out.Quantile(3));
		fprintf("\t 0.75:\t %g\n",out.Quantile(4));
		fprintf("\t 0.95:\t %g\n",out.Quantile(5));
		fprintf("Range is [%g, %g]\n",out.Range(1),out.Range(2));
		fprintf("Std is %g\n",out.Std);
	end
end
